const app = getApp();
Component({
  properties: {
    title: {
      type: String,
      value: ''
    },
    showBack: {
      type: Boolean,
      value: false
    }
  },
  data: {
    statusBarHeight: 0,
    navBarHeight: 0,
    totalHeight: 0
  },
  lifetimes: {
    attached() {
      let navHeight = Number(app.globalData.menuInfo.top - app.globalData.systemInfoData.statusBarHeight)*2+app.globalData.menuInfo.height;
      this.setData({
        statusBarHeight: app.globalData.systemInfoData.statusBarHeight,
        navBarHeight: navHeight,
        totalHeight: app.globalData.systemInfoData.statusBarHeight + navHeight
      });
    }
  },
  methods: {
    onBack() {
      wx.navigateBack();
    }
  }
});